package opengles;

import android.opengl.GLES30;

import com.scu.freehyan.pbojni.GLESJni;

/**
 * Created by freehyan on 9/9/2016.
 */
public class PBO {
    private int[] mPBOId;

    public void createPBO(int pboSize){
        mPBOId = new int[1];
        GLES30.glGenBuffers(1, mPBOId, 0);
        GLES30.glBindBuffer(GLES30.GL_PIXEL_PACK_BUFFER, mPBOId[0]);
       // GLES30.glBufferData(GLES30.GL_PIXEL_PACK_BUFFER, pboSize, null, GLES30.GL_DYNAMIC_READ);
        GLESJni.glBufferDataPBO(GLES30.GL_PIXEL_PACK_BUFFER, pboSize, 0, GLES30.GL_DYNAMIC_READ);
        GLES30.glBindBuffer(GLES30.GL_PIXEL_PACK_BUFFER, 0);
    }

    public int getPBOId(){
       return mPBOId[0];
    }
}
